package com.igd.business.dao;

import java.sql.SQLException;
import java.util.List;

import com.igd.exceptions.IgdException;
import com.igd.pojo.vo.PageList;
import com.igd.security.Resources;
import com.igd.security.Roles;
import com.igd.security.User;

 /**
 * @version  1.0
 *
 * @author   QIAOYU
 *
 * @date     2013-6-24
 *
 * @description	 平台用户信息Dao接口
 */

public interface IUserDao {
	
	/**
	 * 修改用户信息
	 * 
	 * @param user
	 * 
	 * @throws IgdException 
	 * 
	 * @throws SQLException 
	 */
	void updUser(User user) throws SQLException, IgdException;
	
	/**
	 * 删除用户信息
	 * 
	 * @param user
	 * 
	 * @throws SQLException
	 * 
	 * @throws IgdException
	 */
	void deleteUserInfo(User user) throws SQLException, IgdException;
	
	/**
	 * 插入用户信息
	 * 
	 * @param user
	 * 
	 * @return
	 * 
	 * @throws SQLException
	 * 
	 * @throws IgdException
	 */
	User insertUserInfo(User user) throws SQLException, IgdException;
	
	/**
	 * 获取用户信息
	 * 
	 * @param user
	 * 
	 * @return
	 * 
	 * @throws IgdException 
	 * 
	 * @throws SQLException 
	 */
	User queryUser(User user) throws SQLException, IgdException;
	
	/**
	 * 获取用户角色信息
	 * 
	 * @param user
	 * 
	 * @return
	 * 
	 * @throws IgdException
	 *  
	 * @throws SQLException 
	 */
	List<Roles> queryUserRole(User user) throws SQLException, IgdException;
	
	/**
	 * 获取角色对应资源信息
	 * 
	 * @param user
	 * 
	 * @return
	 * 
	 * @throws IgdException
	 *  
	 * @throws SQLException 
	 */
	List<Resources> queryRoleResource(User user) throws SQLException, IgdException;
	
	/**
	 * 获取所有的平台用户
	 * 
	 * @param pageList
	 * 
	 * @param user
	 * 
	 * @return
	 * 
	 * @throws SQLException
	 * 
	 * @throws IgdException
	 */
	public List<User> queryAllUser(PageList pageList,User user) throws SQLException, IgdException;
}
